/**
 * Proyecto: Cognitum
 * Global IT Services 2008
 * @author Mislas
 */
Cognitum.Cartera.Contacto.Editor = Ext.extend(Karma.EBCard, {

    initComponent: function(){
        Ext.apply(this, {
            sections: [{
                title: 'Contacto',
                items: [{
                    fieldLabel: 'Nombre',
                    name: 'Nombre'
                }, {
                    fieldLabel: 'Email',
                    name: 'Email',
                    vtype: 'email'
                }, {
                    fieldLabel: 'Puesto',
                    name: 'Puesto'
                }, {
                    xtype: 'entity.link',
                    entityName: 'Personas Morales',
                    name: 'PersonaMoral',
                    fieldLabel: 'Cliente',
                    disabled: true
                },
	            {
	                fieldLabel: 'Estatus',
	                name: 'Estatus',
	                xtype: 'enum.combo',
	                enumName: 'Cognitum.Dominio.Aplicacion.EstatusEnum',
	                hidden: true,
	                hideLabel: true
                }]
            }, {
                title: 'Telefonos',
                items: [{
                    xtype: 'ag.list',
                    entityName: 'TelefonosPM',
                    hideLabel: true,
                    name: 'Telefonos',
                    anchor: '99% 99%',
                    context: 'p.Contacto.Id=?'
                }]
            }, {
                title: 'Ramos',
                items: [{
                    xtype: 'ag.list',
                    entityName: 'RamosContacto',
                    hideLabel: true,
                    name: 'Ramos',
                    anchor: '99% 99%',
                    context: 'p.Contacto.Id=?'
                }]
            }, {
                xtype: 'sec.editor',
                title: 'Info Permisos'
            }, {
                xtype: 'aud.editor',
                title: 'Info registro'
            }]
        });
        Cognitum.Cartera.Contacto.Editor.superclass.initComponent.apply(this, arguments);
    }
    
});

Ext.reg('cpm.editor', Cognitum.Cartera.Contacto.Editor);
